# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gpaste
pkgver=45
pkgrel=1
pkgdesc="Clipboard management system"
url="https://www.imagination-land.org/tags/GPaste.html"
license=(BSD)
arch=(loong64 x86_64)
depends=(
  gcr-4
  gtk3
  gtk4
  libadwaita
)
makedepends=(
  git
  gnome-control-center
  gnome-shell
  gobject-introspection
  meson
  vala
)
optdepends=("wgetpaste: Upload clipboard contents")
_commit=37f3712287e4d2dcfc61eb38949384d061b76514  # tags/v45^0
source=("git+https://github.com/keruspe/gpaste#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd gpaste
  git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd gpaste
}

build() {
  arch-meson gpaste build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 gpaste/COPYING
}

# vim:set sw=2 sts=-1 et:
